#ifndef FLASH_BLOB_H
#define FLASH_BLOB_H

#include <stdint.h>

#define M7_RAM_ADDRESS_BASE	0x20100000
#define M0_RAM_ADDRESS_BASE	0x30000000
#define RAM_DATA_SIZE		0x8000
#define RESERVE_ALGO_SIZE	0x800
#define RESERVE_STACK_SIZE	0x1000

typedef struct {
    uint32_t breakpoint;
    uint32_t static_base;
    uint32_t stack_pointer;
} program_syscall_t;

typedef struct {
	uint32_t  init;
	uint32_t  uninit;
	uint32_t  erase_chip;
	uint32_t  erase_sector;
	uint32_t  program_page;
    uint32_t  check_blank;
    uint32_t  verify;
	program_syscall_t sys_call_s;
	uint32_t  program_buffer;
	uint32_t  algo_start;
	uint32_t  algo_size;
	uint32_t *algo_blob;
	uint32_t  program_buffer_size;
} program_target_t;

extern  program_target_t m0_flash_algo;
extern  program_target_t m7_flash_algo;

#endif
